<template>
  <el-dialog
    :title="title"
    width="30%"
  >
    <span>{{content}}</span>
    <template #footer>
      <span class="dialog-footer">
        <el-button @click="cancel">取消</el-button>
        <el-button type="primary" @click="ok"
          >确定</el-button
        >
      </span>
    </template>
  </el-dialog>
</template>
<script lang="ts" setup>
import { defineProps } from 'vue'
const props = defineProps({
  title: { default: '温馨提示', type: String },
  content: { required: true, type: String },
  okCal: { type: Function },
  cancelCal: { type: Function }
})
const ok = () => {
  props.okCal?.apply(null)
}
const cancel = () => {
  props.cancelCal?.apply(null)
}
</script>
